home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 10 Scripting / 05 Barnes, Hutchens / Listing2.cpp < prev   
Encoding:
Text File  |  2001-12-09  |  3.6 KB  |  126 lines

  1. /* Copyright (C) Jonty Barnes and Jason Hutchens, 2001. 
  2.  * All rights reserved worldwide.
  3.  *
  4.  * This software is provided "as is" without express or implied
  5.  * warranties. You may freely copy and compile this source into
  6.  * applications you distribute provided that the copyright text
  7.  * below is included in the resulting source code, for example:
  8.  * "Portions Copyright (C) Jonty Barnes and Jason Hutchens, 2001"
  9.  */
  10.  
  11. // A complete cinematic sequence introducing the
  12. // "Lost Brother" Challenge.
  13.  
  14. begin cinema
  15.     // Create a moody storm
  16.     start music MOODY_PIANO
  17.     Storm = create WEATHER DRIZZLE at {Brother}
  18.  
  19.     // Move the sister out with a new walking animation
  20.     move Sister position to {SoapBox}
  21.     set Sister anim DESPAIR_WALK
  22.  
  23.     // Set the camera to dynamically follow the sister
  24.     set camera focus follow Sister
  25.     move camera position to {SoapBox}+{-3,4,-3} time 10
  26.  
  27.     // When the sister nears her soapbox, make her pray
  28.     wait until {Sister} near {SoapBox} radius 1
  29.     Sister play PRAY loop 1
  30.     wait 4 seconds
  31.  
  32.     // Sister: "Oh holy one, I kneel before you."
  33.     say LOST_BROTHER_LINE1
  34.     wait until camera ready
  35.  
  36.     // Zoom the camera in on the sister
  37.     move camera position to {Sister}+{-2,1,-2} time 8
  38.     move camera focus to {Sister}+{0,0.7,0} time 8
  39.  
  40.     // Wait until she's said her line and stopped praying
  41.     wait until read and Sister played
  42.  
  43.     // Turn the sister to face her brother and point at him
  44.     set Sister focus to {SickBed}
  45.     Sister play POINTING loop 1 
  46.  
  47.     // Sister: "My brother ... [has] ... become lost."
  48.     say LOST_BROTHER_LINE2
  49.  
  50.     // Move camera behind the sister, wait until done pointing
  51.     move camera position to {1703,18,2592.5} time 5
  52.     move camera focus to {Sister} time 8
  53.     wait until read and Sister played
  54.     wait until camera ready
  55.     Sister play DESPAIR_STAND loop 1
  56.  
  57.     // Fade to black
  58.     set fade red 0 green 0 blue 0 time 1.5
  59.     wait until fade ready
  60.  
  61.     // Move the camera along a pre-defined path and fade in
  62.     move camera to TRACK00_START time 3
  63.     set fade in time 2            
  64.     camera path TRACK00            
  65.     set Brother focus to {BrotherCamPos}
  66.     set Sister position to {SoapBox}
  67.     wait 1 second
  68.  
  69.     // Make the brother suffer (Brother: "Ugh.")
  70.     Brother play POISONED loop 1
  71.     start sound GROAN1 at {Brother}
  72.  
  73.     // Sister: "He is so weak, I'm frightened he'll die!"
  74.     say single line LOST_BROTHER_LINE3
  75.     wait until read
  76.     wait until camera ready
  77.  
  78.     // Emphasize his sickness (Brother: "Eueergh!")
  79.     move camera position to {Brother}+{2,0.3,-2} time 4
  80.     move camera focus to {Brother} time 3
  81.     wait 2 seconds
  82.     start sound GROAN2 at {Brother}
  83.  
  84.     // Make the brother look like he is dying
  85.     Brother play DYING loop -1
  86.  
  87.     // Cut back to crying sister
  88.     set camera position to {1703,18,2592.5}
  89.     set camera focus to {Brother}
  90.  
  91.     // Sister: "If you find him I'll give you the gate stone."
  92.     say single line LOST_BROTHER_LINE4
  93.     Sister play MOURNING loop 1
  94.     wait 1 seconds
  95.  
  96.     // Focus the camera on the stormy mountain
  97.     move camera position to {1725.8,28,2576} time 8
  98.     move camera focus to {1667,17.2,2589} time 8
  99.     wait until read
  100.     wait until camera ready
  101.     stop music
  102.  
  103.     // Get the advisor spirits on screen
  104.     eject good spirit
  105.     eject evil spirit
  106.  
  107.     // Evil: "I gotta plan, lets trash the house ..."
  108.     make evil spirit point at {House}
  109.     say LOST_BROTHER_LINE5
  110.     wait until read    
  111.     stop evil spirit pointing
  112.  
  113.     // Good: "I heartily object. That's just malicious."
  114.     say LOST_BROTHER_LINE6
  115.     wait until read
  116.  
  117.     // Evil: "That's kinda the whole point!"
  118.     say LOST_BROTHER_LINE7
  119.     wait until read
  120.  
  121.     // Send the advisor spirits away
  122.     send good home
  123.     send evil home
  124. end cinema
  125.  
  126.